# LirsyAPI 
> **Li**bre **R**ecommender **Sy**stem API

### Deploying
#### Clone the repository
```
git clone https://notabug.org/guilmour/LirsyAPI.git
```
```
cd code
```
#### Initiate Docker/SCONE Container
```
sudo docker login
```

```
sudo docker run --device=/dev/isgx --rm -it -v "$PWD":/usr/src/myapp -w /usr/src/myapp sconecuratedimages/apps:python-3.5.4-alpine3.6 sh
```
#### Install extra dependecies on the container
```
apk update &&
apk add --no-cache bats libbsd openssl musl-dev build-base  &&
pip install numpy==1.14.5 &&
apk add freetype libgfortran libgcc libpng libstdc++ musl openblas tcl tk &&
pip install scikit-surprise==1.0.5 &&
apk add nano
```
#### Run the script with SCONE
```
SCONE_HEAP=16384M SCONE_VERSION=1 SCONE_MODE=HW SCONE_ALPINE=1 time python surprise-item-item-rs.py &> out_knnwithmeansHW.txt
```

<!--### Plataform Architure

<img src="https://notabug.org/guilmour/LirsyAPI/raw/master/docs/paltaforma_arch.png" width=500>
-->

### Basic Architecture of the API
![](https://notabug.org/guilmour/LirsyAPI/raw/master/docs/liarsyapi_basic.png)